<?php

namespace app\admin\model\thm;

use think\Model;

class App extends Model
{
    // 表名
    protected $name = 'thm_app';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [
        'a3_check1_text',
        'a3_check2_text',
        'a3_check3_text',
        'a3_check4_text',
        'a3_check5_text',
        'a3_check6_text',
        'a3_check7_text',
        'a3_check8_text',
        'a4_check_text'
    ];
    

    
    public function getA3Check1List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check2List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check3List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check4List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check5List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check6List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check7List()
    {
        return ['' => __(''),'是' => __('是')];
    }     

    public function getA3Check8List()
    {
        return ['' => __(''),'是' => __('是')];
    }

    public function getA3Check9List()
    {
        return ['' => __(''),'是' => __('是')];
    }

    public function getA3Check10List()
    {
        return ['' => __(''),'是' => __('是')];
    }

    public function getA4CheckList()
    {
        return ['开启客户留言' => __('开启客户留言'),'关闭客户留言' => __('关闭客户留言')];
    }     


    public function getA3Check1TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check1']) ? $data['a3_check1'] : '');
        $list = $this->getA3Check1List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check2TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check2']) ? $data['a3_check2'] : '');
        $list = $this->getA3Check2List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check3TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check3']) ? $data['a3_check3'] : '');
        $list = $this->getA3Check3List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check4TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check4']) ? $data['a3_check4'] : '');
        $list = $this->getA3Check4List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check5TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check5']) ? $data['a3_check5'] : '');
        $list = $this->getA3Check5List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check6TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check6']) ? $data['a3_check6'] : '');
        $list = $this->getA3Check6List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check7TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check7']) ? $data['a3_check7'] : '');
        $list = $this->getA3Check7List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA3Check8TextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a3_check8']) ? $data['a3_check8'] : '');
        $list = $this->getA3Check8List();
        return isset($list[$value]) ? $list[$value] : '';
    }


    public function getA4CheckTextAttr($value, $data)
    {        
        $value = $value ? $value : (isset($data['a4_check']) ? $data['a4_check'] : '');
        $list = $this->getA4CheckList();
        return isset($list[$value]) ? $list[$value] : '';
    }




}
